import java.util.Scanner;

public class homework5 {
    public static void main(String[] args) {
        String name="John";
        String password="123";

        Scanner scanner = new Scanner(System.in);
        for (int i=0;i<3;i++) {
            System.out.println("please input name:");
            String userName = scanner.nextLine();
            System.out.println("please input password:");
            String pwd = scanner.nextLine();
            if(userName.equals(name)&&password.equals(pwd))
            {
                System.out.println("login successful");
                break;
            }else {
                continue;
            }
        }



    }
}
